package com.syedu.day11.homework;

import com.syedu.util.InputUtil;

/**
 * 将输入的任意0-999的整数全部补全为三位数输出(不足三位补0)
 */
public class Exercise4 {
    public static void main(String[] args) {
        int number = InputUtil.getInt("请您输入数字(0-999):");
        if (number >= 0 && number <= 999) {
            if (number < 10) {
                System.out.println("00" + number);
            }else if(number<100){
                System.out.println("0" + number);
            }else{
                System.out.println(number);
            }
        } else {
            System.out.println("您输入的数据不合法...");
        }
    }
}